<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="PhotoController.*,java.util.*, java.io.*,java.sql.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/page/page.css">
<link rel="STYLESHEET" type="text/css" href="/KOMORIUTA/css/<%=session.getAttribute("photo") %>.css">
<script src="/KOMORIUTA/photo/PtOld/PtOld.js" type="text/JavaScript"></script>
<script src="/KOMORIUTA/photo/PtOld/jquery.js" type="text/javascript"></script> 
</head>
<%
ArrayList<POldCommentBean> datas=(ArrayList<POldCommentBean>)request.getAttribute("list");
int id=(Integer)request.getAttribute("id");
String nick=(String)session.getAttribute("Mem_Nick");
%>

<body>
<table border=0>
<tr>
<td>
	<div id="c1"></div>
	<%
	for(POldCommentBean pOldCommentBean:datas){
	%>	
	<div id="c2">
		<%=pOldCommentBean.getOc_nick() %>&nbsp;&nbsp;&nbsp;&nbsp;
		<%=pOldCommentBean.getOc_contents() %>
		<%=pOldCommentBean.getOc_date() %>
		<div id="c2_1">
		<%
		String oc_nick=(String)pOldCommentBean.getOc_nick();
		String nick2=(String)session.getAttribute("Mem_Nick");
		if(oc_nick.equals(nick2)){
		%>
		<input id="xbutton" type="button" value="X" onClick="Com_cancle('<%= pOldCommentBean.getId() %>','<%= pOldCommentBean.getOldplus_id() %>')" />
		<%
		}
		%>
		</div>
	</div>
	<div id="c3"></div>
	<%
	}
	%>
	 	
		<form name="c_write" action="/KOMORIUTA/PhotoOldAction.do" method="post">
	 	<input type="hidden" name="action" value="pt_old_recom_write" />
	 	<input type="hidden" name="id" value="<%=id %>" />
	 	<input type="hidden" id="oc_nick" value="<%=nick %>" />
		<table width="600" height="50" border=0>
			<tr>
				<td width="500"><textarea id="comment" class="oc_contents<%=id %>" cols="60" rows="1" onClick="this.value=''">コメントを付ける</textarea></td>
				<td>
				<input type="button" class="button1"  onClick="Comment_write('<%=id %>')" class="combu" />
				</td>
			</tr>　
		</table>
		</form>
</td>
</tr>
</table>
</body>
</html>